package vlms.bean;

import java.util.Date;

/**
 * 
 * This classes is the Data Transfer Object(Value Object) defination for the
 * entity movie
 * 
 */

public class Movie {
	private int movieid;
	private String moviename;
	private String moviebanner;
	private Date releasedate;
	private float rentamount;
	private String category;
	private int copiesavailable;

	public Movie() {
	}

	public Movie(int movieid, String moviename, String moviebanner,
			Date releasedate, int rentamount, String category,
			int copiesavailable) {
		this.movieid = movieid;
		this.moviename = moviename;
		this.moviebanner = moviebanner;
		this.releasedate = releasedate;
		this.rentamount = rentamount;
		this.category = category;
		this.copiesavailable = copiesavailable;
	}

	public Movie(Movie tempMovie) {
		// TODO Auto-generated constructor stub
		this.movieid = tempMovie.movieid;
		this.moviename = tempMovie.moviename;
		this.moviebanner = tempMovie.moviebanner;
		this.releasedate = tempMovie.releasedate;
		this.rentamount = tempMovie.rentamount;
		this.category = tempMovie.category;
		this.copiesavailable = tempMovie.copiesavailable;
	}

	public void setMovieid(int movieid) {
		this.movieid = movieid;
	}

	public int getMovieid() {
		return (movieid);
	}

	public void setMoviename(String moviename) {
		this.moviename = moviename;
	}

	public String getMoviename() {
		return (moviename);
	}

	public void setMoviebanner(String moviebanner) {
		this.moviebanner = moviebanner;
	}

	public String getMoviebanner() {
		return (moviebanner);
	}

	public void setReleasedate(Date releasedate) {
		this.releasedate = releasedate;
	}

	public Date getReleasedate() {
		return (releasedate);
	}

	public void setRentamount(int rentamount) {
		this.rentamount = rentamount;
	}

	public float getRentamount() {
		return (rentamount);
	}

	public void setCategory(String category) {
		this.category = category;
	}

	public String getCategory() {
		return (category);
	}

	public void setCopiesavailable(int copiesavailable) {
		this.copiesavailable = copiesavailable;
	}

	public int getCopiesavailable() {
		return (copiesavailable);
	}
	@Override
	public boolean equals(Object obj) {
		boolean result = false;
		Movie movie = (Movie)obj;
		if (this == obj || movieid == movie.getMovieid())
		{
			result = true;
		}
		return result;
	}
}
